/* 新的色彩方案 */
:root {
  --vt-c-white: #ffffff;
  --vt-c-white-soft: #f8f8f8;
  --vt-c-white-mute: #f2f2f2;

  --vt-c-black: #181818;
  --vt-c-black-soft: #222222;
  --vt-c-black-mute: #282828;

  /* 新的渐变颜色 - 更柔和的色彩 */
  --vt-c-gradient-1: #2c3e50;
  --vt-c-gradient-2: #4a6fa5;
  --vt-c-gradient-3: #166bb3;
  --vt-c-gradient-4: #0f4c81;
  
  --vt-c-star-color: rgba(255, 255, 255, 0.8);
  --vt-c-shooting-star: rgba(255, 255, 255, 0.5);

  --vt-c-divider-light-1: rgba(60, 60, 60, 0.29);
  --vt-c-divider-light-2: rgba(60, 60, 60, 0.12);
  --vt-c-divider-dark-1: rgba(84, 84, 84, 0.65);
  --vt-c-divider-dark-2: rgba(84, 84, 84, 0.48);

  --vt-c-text-light-1: var(--vt-c-white);
  --vt-c-text-light-2: rgba(255, 255, 255, 0.8);
  --vt-c-text-dark-1: var(--vt-c-white);
  --vt-c-text-dark-2: rgba(235, 235, 235, 0.64);
}

/* semantic color variables for this project */
:root {
  --color-background: var(--vt-c-gradient-1);
  --color-background-soft: var(--vt-c-gradient-2);
  --color-background-mute: var(--vt-c-gradient-3);

  --color-border: var(--vt-c-divider-dark-2);
  --color-border-hover: var(--vt-c-divider-dark-1);

  --color-heading: var(--vt-c-text-light-1);
  --color-text: var(--vt-c-text-light-2);

  --section-gap: 160px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  font-weight: normal;
}

body {
  width: 100vw;
  height: 100vh;
  margin: 0;
  padding: 0;
  color: var(--color-text);
  background: var(--color-background);
  line-height: 1.6;
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    Roboto,
    Oxygen,
    Ubuntu,
    Cantarell,
    'Fira Sans',
    'Droid Sans',
    'Helvetica Neue',
    sans-serif;
  font-size: 15px;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* 动态星空渐变背景样式 */
#app {
  position: relative;
  z-index: 1;
  min-height: 100vh;
}

/* 新的背景容器 */
.star-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
}

/* 背景图片 */
.gradient-animation {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('../assets/ziyuan/tupian.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* 星星效果 */
.star {
  position: absolute;
  background-color: var(--vt-c-star-color);
  border-radius: 50%;
  animation: twinkle 3s infinite ease-in-out;
}

/* 流星效果 */
.shooting-star {
  position: absolute;
  width: 1px;
  height: 1px;
  background-color: var(--vt-c-shooting-star);
  border-radius: 50%;
  box-shadow: 0 0 5px 1px var(--vt-c-shooting-star);
  animation: shootingStar 5s linear infinite;
}

/* 动画关键帧 */
@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

@keyframes twinkle {
  0%, 100% {
    opacity: 0.3;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.2);
  }
}

@keyframes shootingStar {
  0% {
    transform: translateX(0) translateY(0) rotate(-45deg);
    opacity: 0;
    width: 1px;
  }
  10% {
    opacity: 1;
    width: 100px;
  }
  100% {
    transform: translateX(-1000px) translateY(1000px) rotate(-45deg);
    opacity: 0;
    width: 1px;
  }
}

/* 确保主内容在背景之上 */
.games-container {
  position: relative;
  z-index: 2;
}

/* 天空背景 */
.sky {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 70%;
  background: linear-gradient(to bottom, var(--vt-c-sky-gradient-1), var(--vt-c-sky-gradient-2));
}

/* 海平面 */
.sea {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 30%;
  background: linear-gradient(to bottom, var(--vt-c-sea-gradient-1), var(--vt-c-sea-gradient-2));
}

/* 海浪动画 */
.wave {
  position: absolute;
  bottom: 30%;
  left: 0;
  width: 200%;
  height: 100px;
  background: url('data:image/svg+xml;utf8,<svg viewBox="0 0 1200 120" preserveAspectRatio="none" xmlns="http://www.w3.org/2000/svg"><path d="M0,0V46.29c47.79,22.2,103.59,32.17,158,28,70.36-5.37,136.33-33.31,206.8-37.5C438.64,32.43,512.34,53.67,583,72.05c69.27,18,138.3,24.88,209.4,13.08,36.15-6,69.85-17.84,104.45-29.34C989.49,25,1113-14.29,1200,52.47V0Z" fill="rgba(255, 255, 255, 0.1)" opacity=".25"/></svg>');
  background-size: 50% 100px;
  animation: wave-animation 15s linear infinite;
}

.wave:nth-child(2) {
  bottom: 30%;
  background: url('data:image/svg+xml;utf8,<svg viewBox="0 0 1200 120" preserveAspectRatio="none" xmlns="http://www.w3.org/2000/svg"><path d="M0,0V15.81C13,36.92,27.64,56.86,47.69,72.05,99.41,111.27,165,111,224.58,91.58c31.15-10.15,60.09-26.07,89.67-39.8,40.92-19,84.73-46,130.83-49.67,36.26-2.85,70.9,9.42,98.6,31.56,31.77,25.39,62.32,62,103.63,73,40.44,10.79,81.35-6.69,119.13-24.28s75.16-39,116.92-43.05c59.73-5.85,113.28,22.88,168.9,38.84,30.2,8.66,59,6.17,87.09-7.5,22.43-10.89,48-26.93,60.65-49.24V0Z" fill="rgba(255, 255, 255, 0.1)" opacity=".5"/></svg>');
  background-size: 50% 100px;
  animation-delay: -5s;
  animation-duration: 20s;
}

.wave:nth-child(3) {
  bottom: 30%;
  background: url('data:image/svg+xml;utf8,<svg viewBox="0 0 1200 120" preserveAspectRatio="none" xmlns="http://www.w3.org/2000/svg"><path d="M0,0V5.63C149.93,59,314.09,71.32,475.83,42.57c43-7.64,84.23-20.12,127.61-26.46,59-8.63,112.48,12.24,165.56,35.4C827.93,77.22,886,95.24,951.2,90c86.53-7,172.46-45.71,248.8-84.81V0Z" fill="rgba(255, 255, 255, 0.1)"/></svg>');
  background-size: 50% 100px;
  animation-delay: -10s;
  animation-duration: 25s;
}

/* 浮动的气泡动画 */
.bubble {
  position: absolute;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.2);
  animation: bubble-animation 8s infinite ease-in;
}

/* 动画关键帧 */
@keyframes wave-animation {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

@keyframes bubble-animation {
  0% {
    transform: translateY(0) scale(0.1);
    opacity: 0;
  }
  50% {
    opacity: 0.8;
  }
  100% {
    transform: translateY(-100vh) scale(1);
    opacity: 0;
  }
}
